package com.woniu.command.handler;

import com.woniu.adapter.WarehouseAdapter;
import com.woniu.outlet.po.WarehousePo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class WarehouseCommandHandler {

    @Autowired
    private WarehouseAdapter warehouseAdapter;



    public Integer addWarehouse(WarehousePo warehousePo){
        warehouseAdapter.addWarehousePo(warehousePo);
        return 1;
    }

    public Integer updateWarehouse(WarehousePo warehousePo){
        warehouseAdapter.updateWarehousePo(warehousePo);
        return 1;
    }

    public Integer deleteWarehouseById(Long id){
        warehouseAdapter.deleteWarehousePoById(id);
        return 1;
    }



}
